<%= javascript_include_tag 'notes_gadget' %>

<style>
	#mail_header {
		float: left;
		font-weight: bold;
		margin-bottom: 5px;
		background-color: gray;
		color: white;
		width: 100%;
		padding-left: 5px;
	}
	
	.mail_item {
		clear: both;
		float: left;
		width: 100%;
		padding-bottom: 8px;
		padding-top: 8px;
		border-bottom: 1px solid #cccccc;
	}

	.mail_item a {
		text-decoration: none;
		color: blue;
	}
	
	.mail_item a:visited {
		color: blue;
	}
	
	.mail_item a:hover {
		text-decoration: underline;
	}
	
	.sender_col {
		float: left;
		width: 100px;
	}
	.subject_col {
		float: left;
		width: 230px;
	}
	.received_col {
		float: left;
	}
	
</style>

<div id="mail_header">
	<div class="sender_col">Sender</div>
	<div class="subject_col">Subject</div>
	<div class="received_col">Received</div>	
</div>
<% @results.each do |result| %>
	<div class="mail_item">
		<div class="sender_col"><%= result.sender %></div>
		<div class="subject_col"><a href="javascript:open_email('<%= @notes_host %>', '<%= @mail_file %>', '<%= result.unid %>')"><%= result.brief_subject %></a></div>
		<div class="received_col"><%= result.received %></div>
	</div>
<% end %>

	